/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package View.venta;

import Controller.VentaC;

/**
 *
 * @author Maryluz
 */
public class calcularNroVenta {

    /**
     * @param args the command line arguments
     */
    
    String xcad;
    String xfecha;
    int xnum;

    public calcularNroVenta(String fecha) {
        xcad="";
        xnum=0;
        xfecha=fecha;
    }
    
    public String convertirNroventa(){
       
       String valor2=xfecha.substring(3, 5);
       String valor3=xfecha.substring(0, 2);
       
       VentaC oC= new  VentaC();
       String x="0000"+(oC.getCountVenta()+1);
       int lg= x.length();
       x= x.substring(lg-5, lg);
       
       x=valor2+""+valor3+"-"+x;
       return x;
    }

}
